package com.example.demo.juc.lock;

/**
 * @Description:
 * @Author: xiatian
 * @CreateTime: 2021/8/24
 * @Company: kangxu
 */
public class WaitMain {
    /**
     * wait start...
     * notify start...
     * notify end...
     * wait end...
     * @param args
     */
    public static void main(String[] args) {
        try {
            Object look = "abc";
            WaitTest1 thread1 = new WaitTest1(look);
            WaitTest2 thread2 = new WaitTest2(look);

            thread1.start();
            // 两秒后唤醒
            Thread.sleep(2000);
            thread2.start();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
